package com.jsnj33.pdaproject.utils;


import com.loopj.android.http.AsyncHttpClient;
import com.loopj.android.http.SyncHttpClient;

/**
 * Created by saxing on 2016/9/29.
 */

public class SaNetUtils {

    public static AsyncHttpClient client = new AsyncHttpClient(); // 创建异步请求的客户端对象

    public static SyncHttpClient syncHttpClient = new SyncHttpClient();

    public static AsyncHttpClient getAsyncHttpClient(){
        //设置超时
        client.setTimeout(1000);
        return client;
    }

    public static SyncHttpClient getSyncHttpClient(){
        //设置超时
        syncHttpClient.setTimeout(300000);
        return syncHttpClient;
    }

}
